#include <iostream>
#include <algorithm>
#include <functional>
using namespace std;

int n,ans;
int r[100005];
bool used[100005],lived[100005];
int Find(int x,bool a){
    if (a){
        int L,R,mid;
        bool flag=false;
        L=1,R=n;
        while (L<=R){
            mid=(L+R)/2;
            if (r[mid]>r[x]&&!used[mid]){
                R=mid-1;
                flag=true;
            }else{
                L=mid+1;
            }
        }
        if (flag) return mid;
        else return -1;
    }else{
        int L,R,mid;
        bool flag=false;
        L=1,R=n;
        while (L<=R){
            mid=(L+R)/2;
            if (r[mid]<r[x]&&!lived[mid]){
                L=mid+1;
                flag=true;
            }else{
                R=mid-1;
            }
        }
        if (flag) return mid;
        else return -1;
    }
}

int main (){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cin >> n;
    for (int i=1;i<=n;i++){
        cin >> r[i];
    }
    sort(r+1,r+n+1,less<int>());
    for (int i=1;i<=n;i++){
        if (!lived[i]){
            int tmp=Find(i,true);
            if (tmp!=-1){
                lived[i]=true;
                used[tmp]=true;
            }
        }
        if (!used[i]&&!lived[i]){
            int tmp=Find(i,false);
            if (tmp!=-1){
                lived[tmp]=true;
                used[i]=true;
            }else{
                tmp=Find(i,true);
                if (tmp!=-1){
                    used[i]=true;
                }
            }
        }
    }
    for (int i=1;i<=n;i++){
        if (!lived[i]) ans++;
    }
    cout << ans << endl;
    return 0;
}